import os, webbrowser, threading, time, sys

HTML = '''
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>lsy</title>
<style>
html,body{height:100%;margin:0;background:#000;display:flex;align-items:center;justify-content:center;}
img{border:none;max-width:100%;max-height:100%;image-rendering:-webkit-optimize-contrast;}
</style>
</head>
<body>
<img src="https://pic.imgdb.cn/item/642547f5a682492fcc15cd5d.gif">
</body>
</html>'''

tmp = os.path.join(os.getcwd(), 'love.html')
with open(tmp, 'w', encoding='utf-8') as f:
    f.write(HTML)
webbrowser.open('file://' + tmp)

threading.Thread(target=lambda: (time.sleep(8), os.remove(tmp), sys.exit(0)), daemon=True).start()